@extends("/main_template",menu="mine")
<div class="mui-content">
	<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary">
		<a class="mui-control-item mui-active" href="#mine-item-cart">我的购物车</a>
		<a class="mui-control-item" href="myOrder.html">我的订单</a>
	</div>
	<div>
		<div id="mine-item-cart" class="mui-control-content mui-active">
            <script id="jsTemplateCartItems" target="#jsCartItems" url="@url("/order/cartItems.json")" type="text/html">
            {{each data item}}
                <div class="mui-table-view-cell">
                    <div class="mui-slider-handle">
                        <a class="mui-pull-left" href="@url("/p")/{{item.stockId}}.html">
                            <img src="{{item.mainImg}}"/>
                        </a>
                        <div class="mui-media-body product-list-info text-ellipsis">
                            {{item.productName}}<br />
                            价格：<span id="realprice">{{item.price}}</span>元<br />
                            <div class="mui-numbox" data-numbox-min='1'>
                                <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
                                <input value="{{item.amount}}" class="mui-input-numbox" type="number" />
                                <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
                            </div>
                        </div>
                    </div>
                    <div class="mui-slider-right mui-disabled">
                        <a class="mui-btn mui-btn-red">删除</a>
                    </div>
                </div>
            {{/each}}
            </script>
			<div class="mui-table-view product-list">
				<div id="jsCartItems">
                    <div class="mui-table-view-cell" style="height: 100vh">
                        此地无银二百两，再去逛逛吧~
                    </div>
                </div>
                <script target="#jsCartSummery" id="jsTemplateCartSummery" type="text/html">
                    <h4>合计：<span>{{total}}</span>件，共<span>{{amount}}</span>元</h4>
                </script>
				<div id="jsCartSummery" class="mui-table-view-cell mui-media cart-summary"></div>
				<div class="mui-content-padded">
                    <button id="jsSettlement" type="button" class="mui-btn mui-btn-green mui-btn-block mui-hidden">去结算</button>
				</div>
			</div>
		</div>
	</div>
</div>
@section(script){
<script type="text/javascript" src="@url("/static/js/app.cart.js")"></script>
}